package com.googlecode.milib.display {
	import com.googlecode.milib.actionControll.MLActionIniMidEnd;
	import com.googlecode.milib.display.MCAnimIniMidEnd;

	import flash.display.MovieClip;

	/**
	 * @author Marek Brun
	 */
	public class MCAnimIniMidEndWithVisible extends MCAnimIniMidEnd {

		public function MCAnimIniMidEndWithVisible(mc:MovieClip, iniFrameStart:*=null, iniFrameEnd:*=null, endFrameStart:*=null, endFrameEnd:*=null, parent:MLActionIniMidEnd=null, midFrame:*=null) {
			super(mc, iniFrameStart, iniFrameEnd, endFrameStart, endFrameEnd, parent, midFrame);
			mc.gotoAndStop(1);
			mc.visible=false;
			
		}
		
		override protected function doStart():Boolean {
			if(super.doStart()){
				mc.visible=true;
				return true;
			}
			return false;
		}
		
		override protected function doFinish():Boolean {
			if(super.doFinish()){
				mc.visible=false;
				return true;
			}
			return false;
		}
	}
}
